package com.ternnetwork.batch.launcher.demo;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobParametersBuilder;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.stereotype.Component;



@Component("creditBillJobLauncher")
public class CreditBillJobLauncher {
	
	/*@Resource(name="jobLauncher")
	private JobLauncher launcher;
	 
	@Resource(name="billJob")
	private Job job;
	
	@Resource
	private SeqService seqService;
	
    public void launch(){
    	
    	JobParametersBuilder p=(new JobParametersBuilder());
    	p.addString("date",DateUtils.format(new Date(), DateUtils.FORMAT_DATE_TIME_YYYYMMDDHHMMSS));
    	p.addString("batchNo",seqService.idoGetNextValueBySeqName("BATCH_NO"));
        try {
        	
			JobExecution result = launcher.run(job,p.toJobParameters() );
			 System.out.println(result.toString());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
    }
*/
}
